local qunxian3__baishoukaiduo_huanshouqinglong = fk.CreateSkill {

  name = "qunxian3__baishoukaiduo_huanshouqinglong",

  tags = { Skill.Compulsory, },

}

Fk:loadTranslationTable {
  ["qunxian3__baishoukaiduo_huanshouqinglong"] = "幻兽青龙",
  [":qunxian3__baishoukaiduo_huanshouqinglong"] = [[锁定技，你受到伤害或失去体力后，你获得一点护甲。
一名角色回合开始与结束时，你增加一点体力上限回复一点体力。并摸三张牌。
你的初始形态为龙型，并获得龙型衍生技。]],
  ["@qunxian3__baishoukaiduo-xingtai"] = "形态",
  ["$qunxian3__baishoukaiduo_huanshouqinglong"] = "就这么想死吗",
}

qunxian3__baishoukaiduo_huanshouqinglong:addEffect(fk.Damaged, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(qunxian3__baishoukaiduo_huanshouqinglong.name)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeShield(player, 1)
  end
})

qunxian3__baishoukaiduo_huanshouqinglong:addEffect(fk.HpLost, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(qunxian3__baishoukaiduo_huanshouqinglong.name)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeShield(player, 1)
  end
})

qunxian3__baishoukaiduo_huanshouqinglong:addEffect(fk.TurnStart, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(qunxian3__baishoukaiduo_huanshouqinglong.name)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeMaxHp(player, 1)
    room:changeHp(player, 1, "recover", qunxian3__baishoukaiduo_huanshouqinglong.name)
    player:drawCards(3, qunxian3__baishoukaiduo_huanshouqinglong.name)
  end
})

qunxian3__baishoukaiduo_huanshouqinglong:addEffect(fk.TurnEnd, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(qunxian3__baishoukaiduo_huanshouqinglong.name)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeMaxHp(player, 1)
    room:changeHp(player, 1, "recover", qunxian3__baishoukaiduo_huanshouqinglong.name)
    player:drawCards(3, qunxian3__baishoukaiduo_huanshouqinglong.name)
  end
})

qunxian3__baishoukaiduo_huanshouqinglong:addAcquireEffect(function(self, player, is_start)
  if player:getMark("@qunxian3__baishoukaiduo-xingtai") == 0 then
    player.room:setPlayerMark(player, "@qunxian3__baishoukaiduo-xingtai", "龙型")
    player.room:handleAddLoseSkills(player, { "qunxian3__baishoukaiduo_longjuan", "qunxian3__baishoukaiduo_huaifeng",
      "qunxian3__baishoukaiduo_rexi", "qunxian3__baishoukaiduo_yanyun" })
  end
end)


return qunxian3__baishoukaiduo_huanshouqinglong
